package com.eascs.web.o2o.report.dto;

import javax.xml.bind.annotation.XmlElement;

import com.eascs.app.context.ConfigContext;

public class FtpConfig {
	@XmlElement(name="ipAddr", required = true)
	private String	ipAddr;		// ip地址
	
	@XmlElement(name="port", required = true)
	private Integer	port;		// 端口号
	
	@XmlElement(name="userName", required = true)
	private String	userName;	// 用户名
	
	@XmlElement(name="pwd", required = true)
	private String	pwd;		// 密码
	
	@XmlElement(name="path", required = true)
	private String	path;		// 本地存储路径
	
	@XmlElement(name="encode", required = true)
	private String	encode;		// 编码
	
	private static FtpConfig ftpConfig = null;
	
	public static FtpConfig getInstance(){
		if(null == ftpConfig){
			synchronized (FtpConfig.class) {
				if(null == ftpConfig){
					ftpConfig = new FtpConfig();
					ConfigContext.bindConfigObject(ftpConfig, "ftp.");
				}
			}
		}
		return ftpConfig;
	}

	private FtpConfig() {
		super();
	}

	public String getIpAddr() {
		return ipAddr;
	}

	public void setIpAddr(String ipAddr) {
		this.ipAddr = ipAddr;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public String getPath() {
		return path;
	}

	public void setPath(String path) {
		this.path = path;
	}

	public String getEncode() {
		return encode;
	}

	public void setEncode(String encode) {
		this.encode = encode;
	}
	
}
